package hhm.utils;

import java.lang.reflect.Proxy;

/**
 * Created by hhm on 2017/4/28.
 */
public class MainTest {

	public static void main(String[] args) {
		Icallee callee = new Callee();
		Icallee proxy = (Icallee) Proxy.newProxyInstance(Icallee.class.getClassLoader(),
				callee.getClass().getInterfaces(), new MyInvocationHandler("2017/4/29", 3, callee));
		for (int i = 0; i < 12; i++) {
			proxy.play();
		}
	}
}
